package cn.jiahua.hospital.mapper;

import cn.jiahua.hospital.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface UserMapper {


    public User getUserById(@Param(value = "id") Integer id);

    public List<User> getUserListByMap(Map<String, Object> param);

    public Integer getUserCountByMap(Map<String, Object> param);

    public Integer insertUser(User user);

    public Integer updateUser(User user);

    public Integer deleteUserById(@Param(value = "id") Integer id);

    public Integer batchDeleteUser(Map<String, List<String>> params);

    //短信登录
    public User getUserByPhone(@Param(value = "phone") String phone);

    public User getUserByPhoneOpenid(@Param(value = "phone") String phone, @Param(value = "userWeChatOpenId") String userWeChatOpenId);

    //根据用户名和性别模糊查询,当前页码和页容量分页  (未拉黑)
    public List<User> userSelectPage(@Param(value = "userName") String userName,
                                     @Param(value = "userSex") Integer userSex,
                                     @Param(value = "pageNo") Integer pageNo,
                                     @Param(value = "pageSize") Integer pageSize);

    public Integer userSelectCount(@Param(value = "userName") String userName,
                                   @Param(value = "userSex") Integer userSex);

    //根据用户名和性别模糊查询,当前页码和页容量分页  (拉黑)
    public List<User> userSelectPage1(@Param(value = "userName") String userName,
                                     @Param(value = "userSex") Integer userSex,
                                     @Param(value = "pageNo") Integer pageNo,
                                     @Param(value = "pageSize") Integer pageSize);

    public Integer userSelectCount1(@Param(value = "userName") String userName,
                                   @Param(value = "userSex") Integer userSex);
}
